package com.linln.admin.sync.domain;

import com.linln.common.utils.StatusUtil;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;

/**
 * @author taofucheng
 * @date 2021/11/26
 */
@Data
@Entity
@Table(name="sync_nacos_default_conf")
@EntityListeners(AuditingEntityListener.class)
@Where(clause = StatusUtil.NOT_DELETE)
@DynamicInsert
@DynamicUpdate
public class NacosDefaultConf implements Serializable {
    //
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    private Long id;
    // 所属环境
    private String env_type;
    // 默认配置内容
    @Lob
    @Column(columnDefinition="TEXT")
    private String content;
    // 状态
    private Integer status;
}